package com.yanqu.road.entity.activity.peakseacraft;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description 船只攻防信息详情
 */
@FieldTypeAnnotation(tableName = "t_c_activity_peak_seacraft_battle_detail")
public class PeakSeacraftBattleDetailData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id",select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "商会分组",select = true, update = true)
    private int unionGroup;
    @FieldTypeAnnotation(desc = "联盟id", update = true)
    private String unionId;
    @FieldTypeAnnotation(desc = "类型 （0攻击 1防守）", update = true)
    private int masterType;
    @FieldTypeAnnotation(desc = "目标联盟id", update = true)
    private String targetUnionId;
    @FieldTypeAnnotation(desc = "轮次", update = true)
    private int round;
    @FieldTypeAnnotation(desc = "海域")
    private int area;
    @FieldTypeAnnotation(desc = "分组")
    private int groupNum;
    @FieldTypeAnnotation(desc = "突袭 总伤害")
    private Map<Long, PeakSeacraftBattleDetailInfo> raidAttackMap = new HashMap<>();
    @FieldTypeAnnotation(desc = "进攻 总伤害")
    private Map<Long, PeakSeacraftBattleDetailInfo> attackMap = new HashMap<>();
    @FieldTypeAnnotation(desc = "道具进攻 总伤害")
    private Map<Long, PeakSeacraftBattleDetailInfo> useGoodMap = new HashMap<>();
    @FieldTypeAnnotation(desc = "最新的 攻击时间 ms")
    private long time;


    public PeakSeacraftBattleDetailData() {
    }

    public PeakSeacraftBattleDetailData(int activityId, int unionGroup, String unionId, int masterType, String targetUnionId, int round, int area, int groupNum) {
        this.activityId = activityId;
        this.unionGroup = unionGroup;
        this.unionId = unionId;
        this.masterType = masterType;
        this.targetUnionId = targetUnionId;
        this.round = round;
        this.area = area;
        this.groupNum = groupNum;
        setInsertOption();
    }

    /**
     * 总伤害
     */
    private long totalDamage;

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public String getUnionId() {
        return unionId;
    }
    public void setUnionId(String unionId) {
        if (unionId == null){
            return;
        }
        if (this.unionId == null || !this.unionId.equals(unionId)) {
            this.unionId = unionId;
            setOp(DataStatus.Update);
        }
    }

    public int getMasterType() {
        return masterType;
    }
    public void setMasterType(int masterType) {
        if (this.masterType != masterType) {
            this.masterType = masterType;
            setOp(DataStatus.Update);
        }
    }

    public String getTargetUnionId() {
        return targetUnionId;
    }
    public void setTargetUnionId(String targetUnionId) {
        if (targetUnionId == null){
            return;
        }
        if (this.targetUnionId == null || !this.targetUnionId.equals(targetUnionId)) {
            this.targetUnionId = targetUnionId;
            setOp(DataStatus.Update);
        }
    }

    public Map<Long, PeakSeacraftBattleDetailInfo> getRaidAttackMap() {
        return raidAttackMap;
    }
    public void setRaidAttackMap(Map<Long, PeakSeacraftBattleDetailInfo> raidAttackMap) {
        if (null == raidAttackMap){
            return;
        }
        if (this.raidAttackMap == null || !this.raidAttackMap.equals(raidAttackMap)) {
            this.raidAttackMap = raidAttackMap;
            setOp(DataStatus.Update);
        }
    }

    public Map<Long, PeakSeacraftBattleDetailInfo> getAttackMap() {
        return attackMap;
    }
    public void setAttackMap(Map<Long, PeakSeacraftBattleDetailInfo> attackMap) {
        if (null == attackMap){
            return;
        }
        if (this.attackMap == null || !this.attackMap.equals(attackMap)) {
            this.attackMap = attackMap;
            setOp(DataStatus.Update);
        }
    }

    public Map<Long, PeakSeacraftBattleDetailInfo> getUseGoodMap() {
        return useGoodMap;
    }
    public void setUseGoodMap(Map<Long, PeakSeacraftBattleDetailInfo> useGoodMap) {
        if (null == useGoodMap){
            return;
        }
        if (this.useGoodMap == null || !this.useGoodMap.equals(useGoodMap)) {
            this.useGoodMap = useGoodMap;
            setOp(DataStatus.Update);
        }
    }

    public long getTime() {
        return time;
    }
    public void setTime(long time) {
        if (this.time != time) {
            this.time = time;
            setOp(DataStatus.Update);
        }
    }

    public long getTotalDamage() {
        return totalDamage;
    }

    public void setTotalDamage(long totalDamage) {
        this.totalDamage = totalDamage;
    }

    public int getArea() {
        return area;
    }

    public void setArea(int area) {
        this.area = area;
    }

    public int getGroupNum() {
        return groupNum;
    }

    public void setGroupNum(int groupNum) {
        this.groupNum = groupNum;
    }

    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        this.round = round;
        if (this.round != round) {
            this.round = round;
            setUpdateOption();
        }
    }

    public int getUnionGroup() {
        return unionGroup;
    }

    public void setUnionGroup(int unionGroup) {
        this.unionGroup = unionGroup;
    }
}
